/**
 * 
 */
package com.ums.core.entity.user;

import java.io.Serializable;
import java.util.Date;

/**
 * @author soulMate
 *
 */
public class AddressDetail implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private long addressDtlId;
	private long userId;
	private String isPrimary;
	private String address1;
	private String address2;
	private String city;
	private String state;
	private String country;
	private String mobile;
	private String phone;
	private long createdBy;
	private Date createDate;
	private long lastModifiedBy;
	private Date lastModifyDate;
	private String isActive;
	private long addrIndex;
	
	public AddressDetail() {
		// TODO Auto-generated constructor stub
	}
	
	/**
	 * @return the addressDtlId
	 */
	public long getAddressDtlId() {
		return addressDtlId;
	}
	/**
	 * @param addressDtlId the addressDtlId to set
	 */
	public void setAddressDtlId(long addressDtlId) {
		this.addressDtlId = addressDtlId;
	}
	/**
	 * @return the userId
	 */
	public long getUserId() {
		return userId;
	}
	/**
	 * @param userId the userId to set
	 */
	public void setUserId(long userId) {
		this.userId = userId;
	}
	/**
	 * @return the isPrimary
	 */
	public String getIsPrimary() {
		return isPrimary;
	}
	/**
	 * @param isPrimary the isPrimary to set
	 */
	public void setIsPrimary(String isPrimary) {
		this.isPrimary = isPrimary;
	}
	/**
	 * @return the address1
	 */
	public String getAddress1() {
		return address1;
	}
	/**
	 * @param address1 the address1 to set
	 */
	public void setAddress1(String address1) {
		this.address1 = address1;
	}
	/**
	 * @return the address2
	 */
	public String getAddress2() {
		return address2;
	}
	/**
	 * @param address2 the address2 to set
	 */
	public void setAddress2(String address2) {
		this.address2 = address2;
	}
	/**
	 * @return the city
	 */
	public String getCity() {
		return city;
	}
	/**
	 * @param city the city to set
	 */
	public void setCity(String city) {
		this.city = city;
	}
	/**
	 * @return the state
	 */
	public String getState() {
		return state;
	}
	/**
	 * @param state the state to set
	 */
	public void setState(String state) {
		this.state = state;
	}
	/**
	 * @return the country
	 */
	public String getCountry() {
		return country;
	}
	/**
	 * @param country the country to set
	 */
	public void setCountry(String country) {
		this.country = country;
	}
	/**
	 * @return the mobile
	 */
	public String getMobile() {
		return mobile;
	}
	/**
	 * @param mobile the mobile to set
	 */
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	/**
	 * @return the phone
	 */
	public String getPhone() {
		return phone;
	}
	/**
	 * @param phone the phone to set
	 */
	public void setPhone(String phone) {
		this.phone = phone;
	}
	/**
	 * @return the createdBy
	 */
	public long getCreatedBy() {
		return createdBy;
	}
	/**
	 * @param createdBy the createdBy to set
	 */
	public void setCreatedBy(long createdBy) {
		this.createdBy = createdBy;
	}
	/**
	 * @return the createDate
	 */
	public Date getCreateDate() {
		return createDate;
	}
	/**
	 * @param createDate the createDate to set
	 */
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	/**
	 * @return the lastModifiedBy
	 */
	public long getLastModifiedBy() {
		return lastModifiedBy;
	}
	/**
	 * @param lastModifiedBy the lastModifiedBy to set
	 */
	public void setLastModifiedBy(long lastModifiedBy) {
		this.lastModifiedBy = lastModifiedBy;
	}
	/**
	 * @return the lastModifyDate
	 */
	public Date getLastModifyDate() {
		return lastModifyDate;
	}
	/**
	 * @param lastModifyDate the lastModifyDate to set
	 */
	public void setLastModifyDate(Date lastModifyDate) {
		this.lastModifyDate = lastModifyDate;
	}
	/**
	 * @return the isActive
	 */
	public String getIsActive() {
		return isActive;
	}
	/**
	 * @param isActive the isActive to set
	 */
	public void setIsActive(String isActive) {
		this.isActive = isActive;
	}
	
	/**
	 * @return the addrIndex
	 */
	public long getAddrIndex() {
		return addrIndex;
	}

	/**
	 * @param addrIndex the addrIndex to set
	 */
	public void setAddrIndex(long addrIndex) {
		this.addrIndex = addrIndex;
	}

	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("\n addressDtlId=" + addressDtlId);
		sb.append("\n userId=" + userId);
		sb.append("\n isPrimary=" + isPrimary);
		sb.append(",\n address1=" + address1);
		sb.append(",\n address2=" + address2);
		sb.append(",\n city=" + city);
		sb.append(",\n state=" + state);
		sb.append(",\n country=" + country);
		sb.append(",\n mobile=" + mobile);
		sb.append(",\n phone=" + phone);
		sb.append(",\n createdBy=" + createdBy);
		sb.append(",\n createDate=" + createDate);
		sb.append(",\n lastModifiedBy=" + lastModifiedBy);
		sb.append(",\n lastModifyDate=" + lastModifyDate);
		sb.append(",\n isActive=" + isActive);
		sb.append("\n");
		
		return sb.toString();
	}
	
	@Override
	public boolean equals(Object obj) {
		if(this == obj) return true;
		if(obj == null) return false;
		
		AddressDetail addr = (AddressDetail)obj;
			
		if(addr.getUserId() != getUserId()) return false;
		if(addr.getAddressDtlId() != getAddressDtlId()) return false;
		
		return true;
	}
}
